@import "mixins";

body {
  -webkit-overflow-scrolling: touch;
}

html, body, #root, .main {
  height: 100%;
  font-size: 14px;
}

/* basic site layout */
.site-layout {
  min-height: 100%;
  position: relative;
}

.ant-layout-sider {
  background: #FFF;
}

.site-header {
  background-color: #FFF;
  z-index: 5;
  box-shadow: 0 0 2px #ccc;
}

.site-content {
  background-color: #FFF;
}

.site-footer {
  background-color: #FFF;
  border-top: solid 1px #ECECEC;
  padding: 24px 30px;
}

/* site layout with overlay header*/
.site-layout.overlay-header {
  .site-header {
    position: absolute;
    top: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0);
    border-bottom: 1px solid transparent;
    box-shadow: none;
    &.sticky {
      position: fixed;
    }
  }
}

/*page content layout*/
.docs-layout {
  margin: 20px 50px;
}

.p-side-navigation {
  width: 240px;
  margin-top: 65px;
  padding-top: 20px;
  position: fixed;
  top: 0;
  left: 50px;
  bottom: 0;
  border-right: 1px solid #e9e9e9;
  overflow-y: auto;
  overflow-x: hidden;
}

.p-docs-content {
  margin: 0 auto;
  max-width: 800px;
}

.p-sideNav-trigger {
  position: fixed;
  left: 0;
  top: 100px;
  font-size: 25px;
  padding: 5px;
  color: #FFF;
  background: #CCC;
  box-shadow: 1px 1px 1px 1px #AAA;
  display: none;
}

.p-docs-anchor {
  width: 150px;
  top: 85px;
  bottom: 0;
  position: fixed;
  overflow-y: auto;
  right: 0;
  padding-left: 5px;
}

.ant-breadcrumb {
  font-size: 14px;
  color: #999;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
  margin-bottom: 25px;

  a {
    color: #108ee9;
  }
}

.comment-cell {
  border-top: 1px solid #eee;
}

// medium screen
@media screen and (max-width: 1340px) {
  .p-docs-anchor {
    display: none;
  }
}

@media screen and (max-width: 1440px) {
  .p-docs-content.with-sideNav {
    margin-left: 270px;
  }
}

// mobile screen
@media screen and (max-width: 1024px) {
  .site-header {
    height: 50px;
    line-height: 50px;
  }

  .docs-layout {
    margin: 20px 40px;
  }

  .p-side-navigation {
    position: fixed;
    transform: translateX(-101%);
    transform: all 1s ease-out;
    top: 100px;
    left: 0;
    min-width: 250px;
    max-width: 300px;
    height: auto;
    overflow: auto;
    padding-bottom: 10px;
    border: none;
    z-index: 5;
    background: #FFF;
    box-shadow: 1px 1px 1px 1px #AAA;
    margin-top: 0;
    padding-top: 0;

    &.show {
      transform: translateX(0);
    }
  }

  .ant-layout-sider {
    transform: translateX(-101%);
    transform: all 1s ease-out;
    min-width: 250px;
    max-width: 300px;
    height: auto;
    position: fixed;
    top: 100px;
    left: 0;
    box-shadow: 1px 1px 1px 1px #AAA;
    z-index: 5;

    &.show {
      transform: translateX(0);
    }
  }

  .p-sideNav-trigger {
    display: block;
  }

  .p-docs-content,
  .p-docs-content.with-sideNav {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

.flexbox-v {
  display: -webkit-box;
  .box-orient(vertical);
  .flexbox-item {
    .box-sizing();
    .box-flex(1);
    min-width: 20px;
    &:first-child {
      margin-left: 0;
    }
  }
}
